package impl

import (
	"micro.user.action.server/dao"
	"micro.user.action.server/factory"
	"micro.user.action.server/models"
)

type UserImpl struct{}

func Builder() factory.UserFactory {
	return &UserImpl{}
}

func (*UserImpl) UserRegister(user *models.VsUser) (uint64, error) {
	return dao.UserRegistry(user)
}

func (*UserImpl) UserLogin(userName, password string) (*models.VsUser, error) {
	return dao.UserLogin(userName, password)
}

func (*UserImpl) QueryUserInfo(userID uint64) (*models.VsUser, error) {
	return dao.QueryUserInfo(userID)
}
